<template>
	<view>
		<u-navbar title="首页" :is-back="false" :background="config.backgroundColor"></u-navbar>
		<Home v-if="config.current == 0"/>
		<category v-if="config.current == 1"/>
		<u-tabbar v-model="config.current" :list="config.tabbarList" ></u-tabbar>
	</view>

</template>

<script lang="ts" setup>
import Home from './components/home.vue'
import Category from './components/category.vue'
import { reactive } from 'vue'
const config = reactive({
	backgroundColor: {
		backgroundImage: 'linear-gradient(45deg, rgb(28, 187, 180), rgb(141, 198, 63))'
	},
	current: 0,
	tabbarList: [{
		iconPath: "home",
		selectedIconPath: "home-fill",
		text: '首页',
		customIcon: false,
	},
	{
		iconPath: "edit-pen",
		selectedIconPath: "edit-pen-fill",
		text: '动作录入',
		customIcon: false,
	},
	{
		iconPath: "grid",
		selectedIconPath: "grid-fill",
		text: '分类录入',
		customIcon: false,
	}
]
})
</script>
